@using System.Linq
@using ApiGenerator.Domain
@using ApiGenerator
@using ApiGenerator.Configuration
@inherits CodeTemplatePage<RestApiSpec>
@{
	RestApiSpec m = Model;
}
@{ await IncludeAsync("GeneratorNotice.cshtml", m); }
namespace Nest
{
	internal static class ApiUrlsLookups 
	{
@foreach (var endpoint in m.Endpoints.Values)
{
	if (CodeConfiguration.IgnoredApisHighLevel.Contains(endpoint.FileName))
	{
		continue;
	}
	var propertyName = $"{endpoint.CsharpNames.Namespace}{endpoint.CsharpNames.MethodName}";
	var paths = endpoint.RequestPartialImplementation.Paths;
	<text>
		internal static ApiUrls @(Raw(propertyName)) = new ApiUrls(new [] {@Raw(string.Join(", ", paths.Select(p=>$"\"{p.Path.TrimStart('/')}\"")))});
	</text>
}
	}
}